<template>
  <div class="app-container">
    <!-- 左侧区域 -->
    <el-card style="width: 100%">
      <el-tabs v-model="activityName" class="demo-tabs">
        <el-tab-pane label="待变更方案列表" name="first">
          <isReviewed v-if="activityName == 'first'" @projectId="projectId" ref="isReviewedRef"/>
        </el-tab-pane>
        <el-tab-pane label="已变更方案列表" name="second">
          <isReviewed
            v-if="activityName == 'second'"
            ref="isReviewedRef"
            :step="2"
            @projectId2="projectId2"
          />
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script setup name="ProjectChange">
import isReviewed from "./components/isReviewed";
const form = ref({});
const router = useRouter()
const isReviewedRef = ref(null)

const activityName = ref("first");
function projectId(val) {
  form.value.projectId = val;
  router.push({
    path: "/project/changeData",
    query: {
      // methodId: scope.row.methodId,
    },
  });
}

onMounted(() => {
  nextTick(() => {
    isReviewedRef.value?.getTableHeight()
  });
});
onUpdated(() => {
  nextTick(() => {
    isReviewedRef.value?.getTableHeight()
  });
});
</script>

<style></style>
